From cb80b32ee8c1c9ab6b6c483d75221e2cd63cab43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Tue, 25 Apr 2017 15:45:37 +0200 Subject: [PATCH] label: Move if statement where it makes sense In the else branch of the if statement before this one, we're assigning *smallest = *widest anyway, so this if statement is never true. Move it to the if block before instead, where it can apply. --- gtk/gtklabel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index b3111dd50b..f4c39e44c5 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -3703,15 +3703,15 @@ gtk_label_get_preferred_layout_size (GtkLabel *label, widest->width = MAX (widest->width, char_pixels * priv->width_chars); widest->x = widest->y = 0; } + + if (widest->width < smallest->width) + *smallest = *widest; } else { *smallest = *widest; } - if (widest->width < smallest->width) - *smallest = *widest; - g_object_unref (layout); } -- 2.30.2